<?php defined('IN_PHPCMS') or exit('Access Denied'); ?><?php include template('phpcms','header'); ?>
<!--begin main-->
<div id="main">
  <!--begin left-->
  <div id="main_l">
    <!--导航-->
    <div id="position"><a href="<?php echo $M['url'];?>">问吧首页</a>积分排行</div>
    <!--标签页-->
    <div class="tag_menu">
      <ul>
        <li <?php if($action=='week') { ?>class="selected"<?php } ?>><a href="<?php echo $M['url'];?>creditlist.php?action=week">上周积分</a></li>
        <li <?php if($action=='month') { ?>class="selected"<?php } ?>><a href="<?php echo $M['url'];?>creditlist.php?action=month">上月积分</a></li>
        <li <?php if($action=='all') { ?>class="selected"<?php } ?>><a href="<?php echo $M['url'];?>creditlist.php?action=all">总积分</a></li>
      </ul>
    </div>
<?php if($action=='week') { ?><?php echo tag('ask', 'tag_credit_list', "SELECT m.userid,m.username,m.preweek AS point,i.lastlogintime,i.logintimes,i.actortype,i.answercount,i.acceptcount FROM `zzinfo_ask_credit` m LEFT JOIN `zzinfo_member_info` i ON m.userid=i.userid ORDER BY preweek DESC", $page, 10, array (  0 => '',  'class' => 'url',  'target' => '_blank',));?><?php } elseif ($action=='month') { ?><?php echo tag('ask', 'tag_credit_list', "SELECT m.userid,m.username,m.premonth AS point,i.lastlogintime,i.logintimes,i.actortype,i.answercount,i.acceptcount FROM `zzinfo_ask_credit` m LEFT JOIN `zzinfo_member_info` i ON m.userid=i.userid ORDER BY premonth DESC", $page, 10, array (  0 => '',  'class' => 'url',  'target' => '_blank',));?><?php } else { ?><?php echo tag('ask', 'tag_credit_list', "SELECT m.userid,m.username,m.point,i.lastlogintime,i.logintimes,i.actortype,i.answercount,i.acceptcount FROM `zzinfo_member` m LEFT JOIN `zzinfo_member_info` i ON m.userid=i.userid ORDER BY point DESC", $page, 10, array (  0 => '',  'class' => 'url',  'target' => '_blank',));?><?php } ?>
  </div>
  <!--end left-->
  <!--begin right-->
  <div id="main_r">
    <h4>最新问题</h4>
    <div>
      <ul class="text_list">
       <?php echo tag('ask', 'tag_ask', "SELECT * FROM `zzinfo_ask` WHERE status='3'  ORDER BY askid DESC", 0, 10, array (  'catid' => '0',  'userid' => '',  'flag' => '-1',  'action' => $action,  'urlruleid' => '29',  'class' => 'url',  'target' => '_blank',  'titlelen' => '46',));?>
      </ul>
    </div>
    <h4>推荐问题</h4>
    <div class="text_list">
      <ul>
        <?php echo tag('ask', 'tag_ask', "SELECT * FROM `zzinfo_ask` WHERE status>2  AND flag='3' ORDER BY askid DESC", 0, 10, array (  'catid' => '0',  'userid' => '',  'flag' => '3',  'action' => $action,  'urlruleid' => '29',  'class' => 'url',  'target' => '_blank',  'titlelen' => '46',));?>
      </ul>
    </div>
  </div>
  <!--end right-->
</div>
<!--end main-->
<!--begin foot-->
<?php include template('phpcms','footer'); ?>